package qlsl.androiddesign.view.subview.activityview;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import qlsl.androiddesign.activity.subactivity.MessageCenterActivity;
import qlsl.androiddesign.adapter.subadapter.MessageCenterAdapter;
import qlsl.androiddesign.entity.commonentity.Pager;
import qlsl.androiddesign.entity.otherentity.MessageCenter;
import qlsl.androiddesign.entity.otherentity.Posting;
import qlsl.androiddesign.http.service.subservice.ForumService;
import qlsl.androiddesign.http.service.subservice.MessageCenterService;
import qlsl.androiddesign.library.pulltorefresh.PullToRefreshListView;
import qlsl.androiddesign.listener.OnPullRefreshListener;
import qlsl.androiddesign.view.baseview.FunctionView;
import qlsl.androiddesign.view.subview.activityview.peoplecenterbase.PeopleCenterBaseView;
import android.os.Bundle;
import android.view.View;
import android.widget.BaseAdapter;
import android.widget.ListView;

import cn.jpush.android.api.JPushInterface;

import com.qlsl.androiddesign.kuaiwa.R;

/**
 * 消息中心页<br/>
 * 需要传入的键：<br/>
 * 传入的值类型： <br/>
 * 传入的值含义：<br/>
 * 是否必传 ：
 */
public class MessageCenterView extends
		PeopleCenterBaseView<MessageCenter, MessageCenterActivity> {

	public MessageCenterView(MessageCenterActivity activity) {
		super(activity);
	}

	protected void initView(View view) {
		super.initView(view);
		setTitle("消息中心");
	}

	protected void initData() {
		super.initData();
		// Bundle bundle = activity.getIntent().getExtras();
		// if (bundle != null) {
		// String title = bundle
		// .getString(JPushInterface.EXTRA_NOTIFICATION_TITLE);
		// String content = bundle.getString(JPushInterface.EXTRA_ALERT);
		// MessageCenter message = new MessageCenter();
		// message.setContent("" + content);
		// message.setTitle("" + title);
		// list.add(message);
		//
		// notifyDataSetChanged();
		// }
		MessageCenterService.queryMessage(1, this, activity);
	}

	protected void initListener() {
		super.initListener();
	}

	public <T> void showNoData(T... t) {

	}

	public void onClick(View view) {
		switch (view.getId()) {
		case R.id.list_item:
			showToast("正在开发中");
			break;
		default:
			break;
		}
	}

	@Override
	public BaseAdapter getAdapter() {
		return new MessageCenterAdapter(activity, list);
	}

}
